//
//  NSError+Custom.m
//  高仿暴走斗图
//
//  Created by huangsongyao on 16/3/6.
//  Copyright © 2016年 huangsongyao. All rights reserved.
//

#import "NSError+Custom.h"

static const NSInteger kMessageCode = 1991;

@implementation NSError (Custom)

+ (NSError *)errorWithErrorType:(kAFNetworkingStatusErrorType)errorType {
    
    NSDictionary *dic = nil;
    
    switch (errorType) {
        case kAFNetworkingStatusErrorTypeNone: {
            
        }
            break;
        
            default:
                break;
    }

    return [[NSError alloc] initWithDomain:@"" code:errorType userInfo:dic];
}

+ (NSError *)errorWithErrorMessage:(NSString *)message {
    
    return [[NSError alloc] initWithDomain:@"" code:kMessageCode userInfo:@{kErrorKey : message}];
}
@end
